package com.novax.ex.activity.infrastructure.entity;

import com.novax.ex.common.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 用户获取et的情况
 *
 * @TableName task_et_rewards
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class TaskEtRewards extends BaseEntity {

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 总冻结数量
     */
    private BigDecimal totalFreeze;

    /**
     * 解冻数量
     */
    private BigDecimal unfreeze;

    /**
     * 版本
     */
    private Long version;

    /**
     * 币种
     */
    private String currency;

    private BigDecimal awaitUnfreeze;// 未解冻数量

    public BigDecimal getAwaitUnfreeze() {
        return totalFreeze.subtract(unfreeze);
    }
}